<div class="pagespan container">
		<div class="wrap">
        	<div class="controls center">
				<p>
					<button class="btn toStart">首页</button><button class="btn prevPage">&laquo; 上页</button><button class="btn backward">&#8249; 移动</button><button class="btn forward">移动 &#8250;</button><button class="btn nextPage">下页 &raquo;</button><button class="btn toEnd">尾页</button><button class="btn" onClick="zoomPdf(76)">+</button><button class="btn" onClick="zoomPdf(83)">-</button><button class="btn" onClick="zoomPdf(82)">还原</button>
				</p>
<ul class="pages" style="display:none;"></ul>
				<p>
					<span class="btn-group" style="display:none;">
						<button class="btn toCenter">toCenter</button>
						<button class="btn toStart" data-item="h3"><strong>H3</strong> toStart</button>
						<button class="btn toCenter" data-item="h3"><strong>H3</strong> toCenter</button>
						<button class="btn toEnd" data-item="h3"><strong>H3</strong> toEnd</button>
					</span>
				</p>
			</div>
			<div class="scrollbar">
				<div class="handle">
					<div class="mousearea"></div>
				</div>
			</div>
			<div class="frame nonitembased" id="nonitembased">
				<div id="panzoom" class="slidee">
                <?php
				for($i = 0; $i<53; $i++) {
				?>
                    <div id="pdfPage_<?php echo $i;?>" class="pdfread"><center><img src='<?php echo $this->config->item('static_url'); ?>images/loading_pdf.gif'></center></div>
                <?php }; ?>

				</div>
			</div>
			
		</div>

		
	</div>

<script language="javascript">
	var loadpn = [];
	for(var li = 0; li < 53; li++) {
		loadpn[li] = 0;
	}
	var pn = 0;
	var pn_in = 0;
	setInterval("begin()","1000");
	function begin() {
		for(i in loadpages) {
			pn = i * 600 / 1024;
			pn_in = Math.ceil(pn);
			if(loadpages[i] == 1 && loadpn[pn_in] == 0) getRead(i, pn_in);
			//if(loadpages[i] == 1 && loadpn[pn_in - 0 + 1] == 0) getRead(i, pn_in - 0 + 1);
		}
	}
	//getRead(0);
	function getRead(id, pn_in) {
		//$("#pdfPage_" + id).html('<iframe src="read.php?name=&id=1&pn=' + (id - 0 + 1) + '" allowtransparency="1" frameborder="0" height="1024" width="800" scrolling="no" ></iframe>');
		loadpages[id] = 2;
		//return;
		//$("#pdfPage_" + id).html("<center><img src='images/loading.gif'></center>");
		$.ajax({
			url : "/reading/read.php?name=&id=1&pn=" + (pn_in - 0 + 1),
			dataType : "html",
			success : function(data) {
				//var data = $(data).find("DIV").parent().html().replace(/src="/i, 'src="/pdfread/test/');
				var data = $(data).find("DIV").parent().html();//alert(data);
				$("#pdfPage_" + pn_in).html('<div style="position:relative;width:799;height:1024;">' + data + '<div>');
				loadpages[id] = 3;
				loadpn[pn_in] = 1;
			}
		})	
	}
	
	var zoom_i=0;
	function zoomPdf(IEKey){
	　　if (IEKey == 76) {
		　　zoom_i++;
		　　document.body.style.zoom=1+zoom_i/10;
	　　}
	　　if (IEKey == 83) {
		　　zoom_i--;
		　　document.body.style.zoom=1+zoom_i/10;
	　　}
	　　if (IEKey == 82) {
		　　document.body.style.zoom=1;
		　　zoom_i=1;
	　　}

	}
/*document.oncontextmenu = function (event){
	if(window.event){
		event = window.event;
	}try{
		var the = event.srcElement;
		if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTAREA")){
			return false;
		}
		return true;
	}catch (e){
		return false; 
	} 
}
*/
</script>